/**
 * @FileName Client.java
 * @Package com.designMode.iterator
 * -------------------------------------
 * @function Please write description of function
 * @Date 2016-1-18 上午11:49:39
 * -------------------------------------
 * Copyright (c) 2016,顾博君 All Rights Reserved.
 */
package com.designMode.iterator;

/**
 * @author 顾博君
 * @ClassName Client
 * @Date 2016-1-18 上午11:49:39
 * @Function 场景类
 */
public class Client {
    public static void main(String[] args) {
        //新建容器类
        Agregate agr = new ConcreteAgregate();
        agr.add("Bobby");
        agr.add("Gu");
        agr.add("gbj");
        //获得迭代器
        Iterator iterator = agr.iterator();
        //执行遍历
        while (iterator.hasNext()) {
            System.out.println(iterator.next());
        }
    }
}
